package com.example.cnotebook.util;

import android.content.Context;
import android.content.SharedPreferences;

public class ShareUtils {

    public static void putString(Context context,String fileName,String name,String data){
        SharedPreferences sp = context.getSharedPreferences(fileName,Context.MODE_PRIVATE);
        sp.edit().putString(name,data).apply();
    }
    public static String getString(Context context,String fileName,String name){
        SharedPreferences sp = context.getSharedPreferences(fileName,Context.MODE_PRIVATE);
        return sp.getString(name,null);
    }
}
